import { request } from "../utils/request";
import { IClassify, IClassifyList, INotice, IRandomWall, IhomeBanner } from "./type";

export const apiGetBanner = ():Promise<IhomeBanner[]>=>{
	return request({url:"/homeBanner"})
}

export const apiGetRandomWall = ():Promise<IRandomWall[]>=>{
	return request({url:"/randomWall"})
}

export const apiGetNotice = (data={}):Promise<INotice[]>=>{
	return request({url:'/wallNewsList',data})
}

export const apiGetClassify = (data = {}):Promise<IClassify[]>=>{
	return request({url:'/classify',data})
}

export const apiGetClassifyList = (data={}):Promise<IClassifyList[]>=>{
	return request({url:'/wallList',data})
}

export const apiUserScore = (data={})=>{
	return request({url:'/setupScore',data})
}

export const apiDownLoad = (data={})=>{
	return request({url:'/downloadWall',data})
}

export const  apiGetSingleWallPaper = (data={}):Promise<IClassifyList[]>=>{
	return request({url:'/detailWall',data})
}

export const apiGetUserInfo = ()=>{
	return request({url:'/userInfo'})
}

export const apiGetHistoryList = (data):Promise<IClassifyList[]>=>{
	return request({url:'/userWallList',data})
}

export const apiSearchWallPaper = (data:{keyword:string,pageNum:number,pageSize:number}):Promise<IClassifyList[]>=>{
	return request({'url':'/searchWall',data})
}